<template>
	<view class="content">
		<!-- 当前问题类型所有问题名字 -->
		<view>
			<scroll-view scroll-x class="bg nav text-white">
				<!-- 当前问题类型名字 -->
				<!-- <view class="cu-item flex-sub">
					{{ categoryName.categoryName }}
				</view> -->
			</scroll-view>
			<scroll-view scroll-x class="bg nav text-white">
				<view class="flex justify-between margin-bottom bg padding-sm" v-for="(item,index) in quseList"
					:key="index" @tap="goList(item)">
					{{item.name}}
				</view>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// categoryName: {},
				// 当前问题类型名字
				quseList: []
			}

		},
		onLoad(option) {
			this.id = option.id;
			console.log(this.id)
			uni.setNavigationBarTitle({
				title: option.name
			})
			this.getData();
		},
		methods: {
			getData() {
				this.$myRequest({
					url: "/getQuesList/" + this.id,
					method: "get",
					data: {
						id: this.id
					}
				}).then(r => {
					console.log(r);
					this.quseList = r.data.data;
					// this.categoryName = r.data.data;
				})
			},
			goList(e) {
				console.log("问题id：", e.id);
				uni.navigateTo({
					url: '/my/help/quesAndAnswer?id=' + e.id
				})
			}
		}
	}
</script>

<style>
	page {
		background-color: #111224;
	}

	.bg {
		background-color: #1E1F31;
	}
</style>
